//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_xsendmsgsysmsg.sqf"
#include "x_setup.sqf"

private "_xctrl";
disableSerialization;
_xx_display = __uiGetVar(XD_MsgDialog);
_xctrl = _xx_display displayCtrl 1010;
if (ctrlText (_xx_display displayCtrl 1201) != "") then {
	if (x_player_name != ctrlText _xctrl) then {
		["x_msg_net", [ctrlText _xctrl,x_player_name,ctrlText (_xx_display displayCtrl 1201)]] call FUNC(NetCallEvent);
		systemChat format [(localize "STR_DOM_MISSIONSTRING_879"), ctrlText _xctrl];
	} else {
		systemChat (localize "STR_DOM_MISSIONSTRING_880");
	};
	_one_ele = [ctrlText _xctrl, ctrlText (_xx_display displayCtrl 1201), date];
	x_pm_send_ar = [x_pm_send_ar, [_one_ele], 0] call FUNC(arrayInsert);
	x_pm_send_ar_update = true;
} else {
	systemChat (localize "STR_DOM_MISSIONSTRING_881")
};